package cn.zijitc.web;

import cn.zijitc.config.SpringConfigsation;
import cn.zijitc.service.UserService;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class UserController {
    public static void main(String[] args) {
        //ApplicationContext app=new ClassPathXmlApplicationContext("applicationContext.xml");
        ApplicationContext app=new AnnotationConfigApplicationContext(SpringConfigsation.class);
        UserService userService = app.getBean("UserService",UserService.class);
        userService.save();
    }
}
